package com.zhangh.summer.admin.biz.menu.impl;

import com.zhangh.summer.admin.model.po.AdOperationPO;
import com.zhangh.summer.admin.model.po.AdOperationPOExample;
import com.zhangh.summer.admin.support.aop.tx.MultiDs;
import com.zhangh.summer.admin.support.ds.common.MixedDS;
import com.zhangh.summer.admin.biz.menu.OperationBiz;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description: TODO
 * @author: zhanghui  zhanghlucky@163.com
 * @create: 2021-09-29 00:09
 **/
@Service
@Slf4j
public class OperationBizImpl implements OperationBiz {
    @Resource
    private MixedDS mixedDS;

    @Override
    @MultiDs
    public List<AdOperationPO> getMenuOperation(Long menuID) {
        AdOperationPOExample example=new AdOperationPOExample();
        example.createCriteria().andMenuIDEqualTo(menuID);
        List<AdOperationPO> list=this.mixedDS.txDs().mapper().selectByExample(example);
        return list;
    }
}
